package com.zte.claa.inficombo.csa.app.comm.csif.mina.msg;

public class CSIFMsgHead {
	public static final short MAIN_VER = 1;
	public static final short SUB_VER = 2;
	
	private short begin = 0x0a;
	private short mainVer = MAIN_VER;
	private short subVer = SUB_VER;
	private int msgLen = 0;
	
	/**
	 * 头部字节数（固定5个字节）
	 * @return
	 */
	public static int getHeadSize(){
		return 5;
	}
	
	public CSIFMsgHead(){
		
	}

	public short getBegin() {
		return begin;
	}

	public void setBegin(short begin) {
		this.begin = begin;
	}

	public short getMainVer() {
		return mainVer;
	}

	public void setMainVer(short mainVer) {
		this.mainVer = mainVer;
	}

	public short getSubVer() {
		return subVer;
	}

	public void setSubVer(short subVer) {
		this.subVer = subVer;
	}

	public int getMsgLen() {
		return msgLen;
	}

	public void setMsgLen(int msgLen) {
		this.msgLen = msgLen;
	}
	
	public String toString(){
		StringBuilder sb = new StringBuilder();
		sb.append("Begin=").append(this.begin).append(";\n");
		sb.append("MainVer=").append(this.mainVer).append(";\n");
		sb.append("SubVer=").append(this.subVer).append(";\n");
		sb.append("MsgLen=").append(this.msgLen).append(".");
		return sb.toString();
	}
}
